# -*- coding:utf-8 -*-

"""
测试百分比 购买流程优化，20%流量 -将数据插入 客群
"""

from aw import *
from autotest import *

import time


class Test_015(TestCase):
    def setUp(self):
        print("Test_001 setUp")

    def test(self):
        d = {"丁盼": "15013590958",
             "刘骏": "15872097043",
             "刘颖": "13828752923",
             "胡鑫": "18370995219",
             "周旺": "18570602290",
             "陈春林": "13929535270",
             "周志强": "18664938853",
             "张兴垣": "18694982851",
             "邬志鹏": "13538003385",
             "程天超": "18148912905",
             "徐雪霞": "18565687532",
             "李信慧": "13632945571",
             "刘云海": "18670229814",
             "赖琪沐": "13826011672",
             "何兆武": "15013680440", }

        for name in d:
            uid = Common.getAccountInfoByPhone(d.get(name)).get("uid")
            sqlStr = "INSERT INTO `finance_user_colouration`.`t_user_group`(`id`, `uid`, `group_id`, `begin_time`, `end_time`, `is_valid`, `is_del`, `update_time`, `create_time`) VALUES (null, {}, 'testgroup', '2018-12-18 16:50:35', '2018-12-31 16:50:50', 1, 0, '2018-12-18 14:04:21', '2018-12-18 14:04:21');".format(uid)
            Common.execSql(sqlStr)

    def tearDown(self):
        print("Test_001 tearDown")
